package com.unbox.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * <角色实体类
 * </p>
 *
 * @author 王振宇
 * @since 2021-03-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("unbox_role")
@ApiModel(value = "Role", description = "角色")
public class Role implements Serializable {
    private static final long serialVersionUID = 1L;

   /**
    * 标识列
    */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "id", name = "id")
    private Integer id;

   /**
    * 创建时间
    */
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "create_time", name = "createTime")
    private LocalDateTime createTime;

   /**
    * 角色名称
    */
    @TableField(value = "name")
    @ApiModelProperty(value = "name", name = "name")
    private String name;

    @TableField(exist = false)
    private List<Menu> roleMenus;
}
